package cn.itsource.user.mapper;

import cn.itsource.user.domain.TUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface UserMapper extends Mapper<TUser> {
    @Select("select * from t_user where phone=#{telephone}")
    TUser findByPhone(String telephone);

    @Insert("insert into t_user(username,phone,password,state,salt,createtime)" +
            "value(#{username},#{phone},#{password},#{state},#{salt},#{createtime})")
    void save(TUser user);

}
